
#ifndef DESIGN_PATTERNS_CHAIN_OF_RESPONSIBILITY_HANDLER_H_
#define DESIGN_PATTERNS_CHAIN_OF_RESPONSIBILITY_HANDLER_H_

enum Role
{
  USER,
  ROOT,
  OTHER
};

class Handler
{
private:
  Handler* next_handler_;

public:
  Handler();

  explicit Handler(Handler* h);

  Handler* GetNextHandler();

  void SetNextHandler(Handler* h);

  virtual void Process(const Role& role) = 0;

  virtual ~Handler();
};

#endif //DESIGN_PATTERNS_CHAIN_OF_RESPONSIBILITY_HANDLER_H_
